//
//  Collect_CollectionViewCell.m
//  projectA_kuaiZuiManHua
//
//  Created by mk on 15-3-23.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "Collect_CollectionViewCell.h"
#import "ContentTableViewCell.h"
@implementation Collect_CollectionViewCell
- (void)dealloc
{
    [_tableView release];
    [super dealloc];
}
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self ) {
        self.tableView = [[UITableView alloc]init];
        self.tableView.delegate = self;
        self.tableView.dataSource = self;
        [self.contentView addSubview:self.tableView];
        self.tableView.rowHeight = 120;
        [_tableView release];
        [self.tableView registerClass:[ContentTableViewCell class] forCellReuseIdentifier:@"reuse"];
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.tableView.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    ContentTableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"reuse" forIndexPath:indexPath];
    return cell;

}

@end
